package day240522.String;

public class StringTest1 {
    public static void main(String[] args) {


        String s1 = new String("xyz");
        String s2 = new String("xyz");
        System.out.println(s1==s2);
        System.out.println(s1.equals(s2));
    }
    class Student {
        String name;
        int age;

        public Student(String name, int age) {
            this.name = name;
            this.age = age;
        }
        @Override
        public boolean equals(Object obj) {
            Student other = (Student) obj;
            return this.age == other.age;
        }
}}
